import { Box } from '@chakra-ui/react';
import { useCanvasGenerationMode } from 'features/canvas/hooks/useCanvasGenerationMode';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import i18n from '@tourfly/locales';
const GENERATION_MODE_NAME_MAP = {
  txt2img: i18n.t('common.TexttoImage'),
  img2img: i18n.t('common.ImagetoImage'),
  inpaint: i18n.t('common.Inpaint'),
  outpaint: i18n.t('common.Outpaint'),
};

const GenerationModeStatusText = () => {
  const generationMode = useCanvasGenerationMode();
  const { t } = useTranslation();
  return (
    <Box>
      {t('common.mode')} :{' '}
      {generationMode ? GENERATION_MODE_NAME_MAP[generationMode] : '...'}
    </Box>
  );
};

export default memo(GenerationModeStatusText);
